<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    while (true) {
      const year = prompt('wangyang哪一年出身的？').trim()
      console.log(year.length);
      if (!year) continue;
      console.log(year == "2010" ? "回答正确" : "输入错误");
      break
    }
  </script>
</body>

</html>